package com.e3.basdoc.employee.client;

import java.util.List;

import com.e3.basdoc.employee.model.EmployeeModel;
import com.e3.basdoc.employee.model.EmployeeQC;
import com.e3.web.core.client.RPCServiceHelper;
import com.e3.web.core.client.WebException;
import com.extjs.gxt.ui.client.data.PagingLoadConfig;
import com.extjs.gxt.ui.client.data.PagingLoadResult;
import com.google.gwt.core.client.GWT;
import com.google.gwt.user.client.rpc.RemoteService;

public interface EmployeeRPCService extends RemoteService {
	public static class Util {

		private static EmployeeRPCServiceAsync instance;

		public static EmployeeRPCServiceAsync getInstance() {
			instance = (EmployeeRPCServiceAsync) RPCServiceHelper.getService(EmployeeRPCService.class.getName());
			if (instance == null) {
				instance = GWT.create(EmployeeRPCService.class);
				RPCServiceHelper.registerServiceEntryPoint(instance);
			}
			return instance;
		}

	}

	public EmployeeModel newEmployee(EmployeeModel model) throws WebException;
	
	public EmployeeModel modifyEmployee(EmployeeModel model) throws WebException;
	
	public List<EmployeeModel> getEmployeeByCondition(EmployeeQC qc) throws WebException;
	
	public void deleteEmployees(List<EmployeeModel> models) throws WebException;
	
	PagingLoadResult<EmployeeModel> getPagingEmployee(PagingLoadConfig config) throws WebException;

}
